home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1997 / HAM Radio 1997.iso / java / js.pas < prev    next >
Pascal/Delphi Source File  |  1996-04-08  |  9KB  |  373 lines

  1. unit Js;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, ExtCtrls, Buttons, StdCtrls,printers;
  8.  
  9. type              
  10.   TForm6 = class(TForm)
  11.     Image1: TImage;
  12.     Label1: TLabel;
  13.     Memo1: TMemo;
  14.     Button1: TButton;
  15.     Button2: TButton;
  16.     Button3: TButton;
  17.     Button4: TButton;
  18.     Button5: TButton;
  19.     Button6: TButton;
  20.     Button7: TButton;
  21.     Button8: TButton;
  22.     Button9: TButton;
  23.     Button10: TButton;
  24.     Button11: TButton;
  25.     Button12: TButton;
  26.     Button13: TButton;
  27.     Button14: TButton;
  28.     Button15: TButton;
  29.     Button16: TButton;
  30.     BitBtn1: TBitBtn;
  31.     BitBtn2: TBitBtn;
  32.     Memo2: TMemo;
  33.     procedure BitBtn2Click(Sender: TObject);
  34.     procedure Button1Click(Sender: TObject);
  35.     procedure Button3Click(Sender: TObject);
  36.     procedure Button2Click(Sender: TObject);
  37.     procedure Button4Click(Sender: TObject);
  38.     procedure Button5Click(Sender: TObject);
  39.     procedure Button7Click(Sender: TObject);
  40.     procedure Button12Click(Sender: TObject);
  41.     procedure Button9Click(Sender: TObject);
  42.     procedure Button14Click(Sender: TObject);
  43.     procedure Button6Click(Sender: TObject);
  44.     procedure Button11Click(Sender: TObject);
  45.     procedure Button8Click(Sender: TObject);
  46.     procedure Button13Click(Sender: TObject);
  47.     procedure Button16Click(Sender: TObject);
  48.     procedure Button15Click(Sender: TObject);
  49.     procedure Button10Click(Sender: TObject);
  50.     procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  51.       Y: Integer);
  52.     procedure FormShow(Sender: TObject);
  53.     procedure BitBtn1Click(Sender: TObject);
  54.     procedure Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
  55.       Y: Integer);
  56.     procedure Button10MouseMove(Sender: TObject; Shift: TShiftState; X,
  57.       Y: Integer);
  58.     procedure Button11MouseMove(Sender: TObject; Shift: TShiftState; X,
  59.       Y: Integer);
  60.     procedure Button12MouseMove(Sender: TObject; Shift: TShiftState; X,
  61.       Y: Integer);
  62.     procedure Button13MouseMove(Sender: TObject; Shift: TShiftState; X,
  63.       Y: Integer);
  64.     procedure Button14MouseMove(Sender: TObject; Shift: TShiftState; X,
  65.       Y: Integer);
  66.     procedure Button15MouseMove(Sender: TObject; Shift: TShiftState; X,
  67.       Y: Integer);
  68.     procedure Button16MouseMove(Sender: TObject; Shift: TShiftState; X,
  69.       Y: Integer);
  70.     procedure Button2MouseMove(Sender: TObject; Shift: TShiftState; X,
  71.       Y: Integer);
  72.     procedure Button3MouseMove(Sender: TObject; Shift: TShiftState; X,
  73.       Y: Integer);
  74.     procedure Button4MouseMove(Sender: TObject; Shift: TShiftState; X,
  75.       Y: Integer);
  76.     procedure Button5MouseMove(Sender: TObject; Shift: TShiftState; X,
  77.       Y: Integer);
  78.     procedure Button6MouseMove(Sender: TObject; Shift: TShiftState; X,
  79.       Y: Integer);
  80.     procedure Button8MouseMove(Sender: TObject; Shift: TShiftState; X,
  81.       Y: Integer);
  82.     procedure Button9MouseMove(Sender: TObject; Shift: TShiftState; X,
  83.       Y: Integer);
  84.     procedure BitBtn1MouseMove(Sender: TObject; Shift: TShiftState; X,
  85.       Y: Integer);
  86.     procedure BitBtn2MouseMove(Sender: TObject; Shift: TShiftState; X,
  87.       Y: Integer);
  88.     procedure Button7MouseMove(Sender: TObject; Shift: TShiftState; X,
  89.       Y: Integer);
  90.   private
  91.     { Private declarations }
  92.   public
  93.     { Public declarations }
  94.   end;
  95.  
  96. var
  97.   Form6: TForm6;
  98.  
  99. implementation
  100.  
  101. {$R *.DFM}
  102.  
  103. procedure TForm6.BitBtn2Click(Sender: TObject);
  104. begin
  105. CLOSE;
  106. end;
  107.  
  108. procedure TForm6.Button1Click(Sender: TObject);
  109. begin
  110. memo1.visible:=False;
  111. memo1.clear;
  112. memo1.lines.loadfromfile('\text\js2.txt');
  113. memo2.lines.loadfromfile('\text\js2.txt');
  114. end;
  115.  
  116. procedure TForm6.Button3Click(Sender: TObject);
  117. begin
  118. memo1.visible:=False;
  119. memo1.clear;
  120. memo1.lines.loadfromfile('\text\js4.txt');
  121. memo2.lines.loadfromfile('\text\js4.txt');
  122. end;
  123.  
  124. procedure TForm6.Button2Click(Sender: TObject);
  125. begin
  126. memo1.visible:=False;
  127. memo1.clear;
  128. memo1.lines.loadfromfile('\text\js3.txt');
  129. memo2.lines.loadfromfile('\text\js3.txt');
  130. end;
  131.  
  132. procedure TForm6.Button4Click(Sender: TObject);
  133. begin
  134. memo1.visible:=False;
  135. memo1.clear;
  136. memo1.lines.loadfromfile('\text\js5.txt');
  137. memo2.lines.loadfromfile('\text\js5.txt');
  138. end;
  139.  
  140. procedure TForm6.Button5Click(Sender: TObject);
  141. begin
  142. memo1.visible:=False;
  143. memo1.clear;
  144. memo1.lines.loadfromfile('\text\js6.txt');
  145. memo2.lines.loadfromfile('\text\js6.txt');
  146. end;
  147.  
  148. procedure TForm6.Button7Click(Sender: TObject);
  149. begin
  150. memo1.visible:=False;
  151. memo1.clear;
  152. memo1.lines.loadfromfile('\text\js8.txt');
  153. memo2.lines.loadfromfile('\text\js8.txt');
  154. end;
  155.  
  156. procedure TForm6.Button12Click(Sender: TObject);
  157. begin
  158. memo1.visible:=False;
  159. memo1.clear;
  160. memo1.lines.loadfromfile('\text\js1.txt');
  161. memo2.lines.loadfromfile('\text\js1.txt');
  162. end;
  163.  
  164. procedure TForm6.Button9Click(Sender: TObject);
  165. begin
  166. memo1.visible:=False;
  167. memo1.clear;
  168. memo1.lines.loadfromfile('\text\js10.txt');
  169. memo2.lines.loadfromfile('\text\js10.txt');
  170. end;
  171.  
  172. procedure TForm6.Button14Click(Sender: TObject);
  173. begin
  174. memo1.visible:=False;
  175. memo1.clear;
  176. memo1.lines.loadfromfile('\text\js13.txt');
  177. memo2.lines.loadfromfile('\text\js13.txt');
  178. end;
  179.  
  180. procedure TForm6.Button6Click(Sender: TObject);
  181. begin
  182. memo1.visible:=False;
  183. memo1.clear;
  184. memo1.lines.loadfromfile('\text\js7.txt');
  185. memo2.lines.loadfromfile('\text\js7.txt');
  186. end;
  187.  
  188. procedure TForm6.Button11Click(Sender: TObject);
  189. begin
  190. memo1.visible:=False;
  191. memo1.clear;
  192. memo1.lines.loadfromfile('\text\js11.txt');
  193. memo2.lines.loadfromfile('\text\js11.txt');
  194. end;
  195.  
  196. procedure TForm6.Button8Click(Sender: TObject);
  197. begin
  198. memo1.visible:=False;
  199. memo1.clear;
  200. memo1.lines.loadfromfile('\text\js9.txt');
  201. memo2.lines.loadfromfile('\text\js9.txt');
  202. end;
  203.  
  204. procedure TForm6.Button13Click(Sender: TObject);
  205. begin
  206. memo1.visible:=False;
  207. memo1.clear;
  208. memo1.lines.loadfromfile('\text\js12.txt');
  209. memo2.lines.loadfromfile('\text\js12.txt');
  210. end;
  211.  
  212. procedure TForm6.Button16Click(Sender: TObject);
  213. begin
  214. memo1.visible:=False;
  215. memo1.clear;
  216. memo1.lines.loadfromfile('\text\js15.txt');
  217. memo2.lines.loadfromfile('\text\js15.txt');
  218. end;
  219.  
  220. procedure TForm6.Button15Click(Sender: TObject);
  221. begin
  222. memo1.visible:=False;
  223. memo1.clear;
  224. memo1.lines.loadfromfile('\text\js14.txt');
  225. memo2.lines.loadfromfile('\text\js14.txt');
  226. end;
  227.  
  228. procedure TForm6.Button10Click(Sender: TObject);
  229. begin
  230. memo1.visible:=False;
  231. memo1.clear;
  232. memo1.lines.loadfromfile('\text\js16.txt');
  233. memo2.lines.loadfromfile('\text\js16.txt');
  234. end;
  235.  
  236. procedure TForm6.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  237.   Y: Integer);
  238. begin
  239. memo1.visible:=true;
  240. end;
  241.  
  242. procedure TForm6.FormShow(Sender: TObject);
  243. begin
  244. image1.picture.loadfromfile('\js.bmp');
  245. end;
  246.  
  247. procedure TForm6.BitBtn1Click(Sender: TObject);
  248. VAR
  249. MYFILE:TEXTFILE;
  250. LI:INTEGER;
  251. begin
  252.   AssignPrn(MyFile);
  253.   Rewrite(MyFile);
  254.   Writeln(MyFile, ' ');
  255.   Writeln(MyFile, ' ');
  256.   Writeln(MyFile, ' ');
  257.   Writeln(MyFile, '   '+LABEL1.CAPTION);
  258.   Writeln(MyFile, ' ');
  259.   FOR LI:=0 TO MEMO2.LINES.COUNT-1 DO
  260.   Writeln(MyFile, '    '+MEMO2.LINES[LI]);
  261.   System.CloseFile(MyFile);
  262. end;
  263.  
  264. procedure TForm6.Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
  265.   Y: Integer);
  266. begin
  267. button1.setfocus;
  268. end;
  269.  
  270. procedure TForm6.Button10MouseMove(Sender: TObject; Shift: TShiftState; X,
  271.   Y: Integer);
  272. begin
  273. button10.setfocus;
  274. end;
  275.  
  276. procedure TForm6.Button11MouseMove(Sender: TObject; Shift: TShiftState; X,
  277.   Y: Integer);
  278. begin
  279. button11.setfocus;
  280. end;
  281.  
  282. procedure TForm6.Button12MouseMove(Sender: TObject; Shift: TShiftState; X,
  283.   Y: Integer);
  284. begin
  285. button12.setfocus;
  286. end;
  287.  
  288. procedure TForm6.Button13MouseMove(Sender: TObject; Shift: TShiftState; X,
  289.   Y: Integer);
  290. begin
  291. button13.setfocus;
  292. end;
  293.  
  294. procedure TForm6.Button14MouseMove(Sender: TObject; Shift: TShiftState; X,
  295.   Y: Integer);
  296. begin
  297. button14.setfocus;
  298. end;
  299.  
  300. procedure TForm6.Button15MouseMove(Sender: TObject; Shift: TShiftState; X,
  301.   Y: Integer);
  302. begin
  303. button15.setfocus;
  304. end;
  305.  
  306. procedure TForm6.Button16MouseMove(Sender: TObject; Shift: TShiftState; X,
  307.   Y: Integer);
  308. begin
  309. button16.setfocus;
  310. end;
  311.  
  312. procedure TForm6.Button2MouseMove(Sender: TObject; Shift: TShiftState; X,
  313.   Y: Integer);
  314. begin
  315. button2.setfocus;
  316. end;
  317.  
  318. procedure TForm6.Button3MouseMove(Sender: TObject; Shift: TShiftState; X,
  319.   Y: Integer);
  320. begin
  321. button3.setfocus;
  322. end;
  323.  
  324. procedure TForm6.Button4MouseMove(Sender: TObject; Shift: TShiftState; X,
  325.   Y: Integer);
  326. begin
  327. button4.setfocus;
  328. end;
  329.  
  330. procedure TForm6.Button5MouseMove(Sender: TObject; Shift: TShiftState; X,
  331.   Y: Integer);
  332. begin
  333. button5.setfocus;
  334. end;
  335.  
  336. procedure TForm6.Button6MouseMove(Sender: TObject; Shift: TShiftState; X,
  337.   Y: Integer);
  338. begin
  339. button6.setfocus;
  340. end;
  341.  
  342. procedure TForm6.Button8MouseMove(Sender: TObject; Shift: TShiftState; X,
  343.   Y: Integer);
  344. begin
  345. button8.setfocus;
  346. end;
  347.  
  348. procedure TForm6.Button9MouseMove(Sender: TObject; Shift: TShiftState; X,
  349.   Y: Integer);
  350. begin
  351. button9.setfocus;
  352. end;
  353.  
  354. procedure TForm6.BitBtn1MouseMove(Sender: TObject; Shift: TShiftState; X,
  355.   Y: Integer);
  356. begin
  357. bitbtn1.setfocus;
  358. end;
  359.  
  360. procedure TForm6.BitBtn2MouseMove(Sender: TObject; Shift: TShiftState; X,
  361.   Y: Integer);
  362. begin
  363. bitbtn2.setfocus;
  364. end;
  365.  
  366. procedure TForm6.Button7MouseMove(Sender: TObject; Shift: TShiftState; X,
  367.   Y: Integer);
  368. begin
  369. button7.setfocus;
  370. end;
  371.  
  372. end.
  373.